#include <ros/ros.h>
#include <std_msgs/Float32.h>

using namespace std;

void callback(const std_msgs::Float32::ConstPtr &msg)
{
    int num = 0;
    cout<<"receive the "<< num++ <<"distance: " << 100*msg->data <<endl;
}

int main(int argc, char **argv)
{
    ros::init(argc, argv, "receiveNode");

    ros::NodeHandle nh;

    ros::Subscriber sub = nh.subscribe("h_distance", 1000, callback);

    ros::spin();
    return 0;

}